import { useState, useEffect } from 'react'
import './App.css';
import { Banner } from './components/GetServerData/index';

import Spec from './page/Spec'
import MyPopup from './components/MyPopup/index';
import MySwiper from './components/MySwiper';

function App() {
  const [bannerList, setBannerList] = useState([])


  useEffect(() => {
    const res = async () => {
      const data = await Banner()
      setBannerList(data.data)
    }
    res()
  }, [])
  return (
    <div className="App">
      <Spec />
      <MyPopup />
      <MySwiper bannerList={bannerList} />
    </div>
  );
}

export default App;
